#ifndef FORM2_1_H
#define FORM2_1_H

#include <QWidget>
#include <QEventLoop>
#include <QString>
#include "project.h"
#include "form2_3.h"
#include "form2_4_1.h"
#include "widget.h"

namespace Ui {
class Form2_1;
}

class Form2_3;
class Form2_4_1;

class Form2_1 : public QWidget
{
    Q_OBJECT

public:
    explicit Form2_1(Passenger &pass,int t,int quant,Flight &fli,QEventLoop &qel,int c,Widget *las,QWidget *parent = nullptr);
    ~Form2_1();

    Form2_3 *page2_3=nullptr;
    Form2_4_1 *page2_4_1=nullptr;
    Widget *last=nullptr;

    Passenger &passenger;

    int i=0;

    int quantity=0;

    Flight &flight;

    QEventLoop &eventLoop;

    //控制是何种时候进行该页面： 1.余票充足时 2.余票不足但仍购票时 3.候补时
    int control;

private slots:
    void on_lineEdit_name_textChanged(const QString &arg1);

    void on_lineEdit_cabinClass_textChanged(const QString &arg1);

    void on_pushButton_clicked();

private:
    Ui::Form2_1 *ui;
};

#endif // FORM2_1_H
